Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace icon of toggle-sidecar command with an image as a workaround #736

Merged
merged 2 commits into from Jun 24, 2022
Merged

Replace icon of toggle-sidecar command with an image as a workaround #736

merged 2 commits into from Jun 24, 2022

Conversation

jpuris
Copy link
Contributor

@jpuris jpuris commented Jun 23, 2022

Description

The toggle-sidecar command using AppleScript does not run properly, if emoticon is used (in this particular case "馃枼" is used). The script runs fine however, when run manually in Script Editor.

This change replaces the emoticon used for @raycast.icon with a png image.

This is merely a workaround. The root cause as to why this happens, is unknown to me.

Type of change

  • New script command
  • Bug fix
  • Improvement of an existing script
  • Documentation update
  • Toolkit change
  • Other (Specify)

Screenshot

Error when running command with emoticon

error_with_emoticon

Icon (before)

before

Icon (after)

after

Dependencies / Requirements

No change in requirements.

Checklist

Copy link
Member

@dehesa dehesa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there @jpuris ,

Thank you for the feedback and the PR. Having a specific icon is better than having the emoji, but could you please make the icon 64x64 px?

I can shed some light on why the script is not running in Raycast, but it is running in the script editor (funnily we were talking exactly about that in the Slack community yesterday).

Raycast is expecting the script to be encoded in one of the most popular formats (usually UTF-8). That is indeed what the majority of the text editors use. However, the Apple Script Editor uses a legacy encoding format that creates some problems when dealing with newer forms of text input such as emojis.

If you download the script from the repo, open it with any newish text editor (VSCode, TextEdit, etc.), modify the script, and then run it, Raycast won't have any problems. As soon as you open the script with the AppleScript Editor and save it, the encoding would be changed and Raycast will have trouble running it. We have tried to make Raycast to understand such legacy encoding, but it doesn't always work.

@jpuris jpuris requested a review from dehesa June 24, 2022 09:04
@dehesa dehesa merged commit 0b65b6e into raycast:master Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants